<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            background-color: #f00;
            color: white;
            /* center、left、right就不用解释了 */
            /* text-align: center; */
            /* 两端对齐，还需要配合 */
            text-align: justify;
        }
    </style>
</head>
<body>
    <!-- div是独占一行的 -->
    <div class="box">我是div元素</div>
</body>
</html>